home *** CD-ROM | disk | FTP | other *** search
/ Elite College Girls 1 / Elite College Girls - Volume 1.iso / pc / shared.dir / 01953.ls < prev    next >
Encoding:
Text File  |  1996-02-02  |  6.6 KB  |  256 lines

  1. global gImages, gDataPos, gImageCount, theFirstImage, gFirstGroupSprite, gInterfaceSprite, gPictSprite, gCenterH, gCenterV, gCurrentPict, gStartFrame, gEndFrame, gZoomFactor, gZoomFactors, gZoomLevels, gZoomDirection, gSpriteHeight, gSpriteWidth, gSpriteHeightPercent, gSpriteWidthPercent, gDistance, gDistanceH, gDistanceV, gPhotos, gPhotos1, gPhotos2, gPhotos3, gPhotos4, gCurrentGroup, gCurrentPICTlist, gReturnFrame
  2.  
  3. on setGlobals
  4.   set gDistance to 40
  5.   set gZoomFactor to 2
  6.   set gZoomFactors to [0.25, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4]
  7.   set gZoomLevels to count(gZoomFactors)
  8.   set gZoomDirection to 1
  9.   set gFirstGroupSprite to 4
  10.   set gInterfaceSprite to 47
  11.   set gPictSprite to 1
  12.   set gCenterH to 320
  13.   set gCenterV to 240
  14.   repeat with x = 2 to 48
  15.     set the cursor of sprite x to 0
  16.   end repeat
  17. end
  18.  
  19. on selectGroup whichGroup
  20.   if the timer > 60 then
  21.     set gCurrentGroup to whichGroup - 1
  22.     set gCurrentPict to 1
  23.     setProp(1, 48, "visibility", 0)
  24.     puppetTransition(6, 3, 12)
  25.     updateStage()
  26.     go("Hide")
  27.     go(1, "Photos.DIR")
  28.     exit
  29.     set gStartFrame to label("Start " & gCurrentPict)
  30.     set gEndFrame to label("End " & gCurrentPict)
  31.     advanceFrame(0)
  32.     set the cursor of sprite 2 to 0
  33.   end if
  34.   startTimer()
  35. end
  36.  
  37. on selectGroup3 whichGroup
  38.   set gCurrentPict to whichGroup - gFirstGroupSprite + 1
  39.   set gStartFrame to label("Start " & gCurrentPict)
  40.   set gEndFrame to label("End " & gCurrentPict)
  41.   advanceFrame(0)
  42.   set the cursor of sprite 2 to 0
  43. end
  44.  
  45. on checkInterfaceClick userH
  46.   if legalButton(the clickOn) then
  47.     set userH to the mouseH
  48.     if rollOver(the clickOn) then
  49.       if the movie contains "Menu" then
  50.         if userH > 521 then
  51.           if userH < 572 then
  52.             highlight("Interface: Hide", 547, 453)
  53.             interfaceHide()
  54.           else
  55.             if userH < 636 then
  56.               highlight("Interface: Quit", 599, 453)
  57.               interfaceQuit()
  58.             end if
  59.           end if
  60.         end if
  61.       else
  62.         if userH > 3 then
  63.           if userH < 117 then
  64.             highlight("Interface: Main Menu", 65, 453)
  65.             interfaceMainMenu()
  66.           else
  67.             if userH < 216 then
  68.               highlight("Interface: Previous", 167, 452)
  69.               interfacePrevious()
  70.             else
  71.               if userH < 284 then
  72.                 highlight("Interface: Next", 251, 452)
  73.                 interfaceNext()
  74.               else
  75.                 if userH < 363 then
  76.                   highlight("Interface: Zoom In", 323, 453)
  77.                   interfaceZoomIn()
  78.                 else
  79.                   if userH < 462 then
  80.                     highlight("Interface: Zoom Out", 412, 453)
  81.                     interfaceZoomOut()
  82.                   else
  83.                     if userH < 521 then
  84.                       highlight("Interface: Print", 492, 453)
  85.                       interfacePrint()
  86.                     else
  87.                       if userH < 572 then
  88.                         highlight("Interface: Hide", 547, 453)
  89.                         interfaceHide()
  90.                       else
  91.                         if userH < 636 then
  92.                           highlight("Interface: Quit", 599, 453)
  93.                           interfaceQuit()
  94.                         end if
  95.                       end if
  96.                     end if
  97.                   end if
  98.                 end if
  99.               end if
  100.             end if
  101.           end if
  102.         end if
  103.       end if
  104.     end if
  105.   end if
  106. end
  107.  
  108. on highlight whichCast, x, y
  109.   if developersKey() then
  110.     activate(48, whichCast, 1, 36, x, y, EMPTY, EMPTY, EMPTY)
  111.     set the foreColor of sprite 48 to 128
  112.     updateStage()
  113.     if not (whichCast contains "Hide") then
  114.       repeat with x = 1 to 2
  115.         set the visible of sprite 48 to 0
  116.         updateStage()
  117.         set the visible of sprite 48 to 1
  118.         updateStage()
  119.       end repeat
  120.     end if
  121.     deactivate([48])
  122.   end if
  123. end
  124.  
  125. on interfaceMainMenu
  126.   setProp(1, 48, "visibility", 0)
  127.   puppetTransition(6, 3, 12)
  128.   updateStage()
  129.   puppetPalette("System")
  130.   go("Menu", "MainMenu.DIR")
  131.   setProp(1, 48, "visibility", 1)
  132. end
  133.  
  134. on interfacePrevious
  135.   advanceFrame(-1)
  136. end
  137.  
  138. on interfaceNext
  139.   advanceFrame(1)
  140. end
  141.  
  142. on interfaceZoomIn
  143.   if the timer > 10 then
  144.     zoomSprite(gPictSprite, point(gCenterH, gCenterV), the locH of sprite gPictSprite, the locV of sprite gPictSprite, 1)
  145.   end if
  146.   startTimer()
  147. end
  148.  
  149. on interfaceZoomOut
  150.   if the timer > 10 then
  151.     zoomSprite(gPictSprite, point(gCenterH, gCenterV), the locH of sprite gPictSprite, the locV of sprite gPictSprite, -1)
  152.   end if
  153.   startTimer()
  154. end
  155.  
  156. on interfacePrint
  157.   if the timer < 40 then
  158.     exit
  159.   end if
  160.   puppetSprite(gPictSprite, 1)
  161.   hideShow(3, 48, 0, 3)
  162.   moveSprites(5, 48, -1)
  163.   printFrom(the frame, the frame, 75)
  164.   moveSprites(5, 48, 1)
  165.   hideShow(3, 48, 1, 4)
  166.   puppetSprite(gPictSprite, 0)
  167.   startTimer()
  168. end
  169.  
  170. on interfaceHide
  171.   if the timer < 30 then
  172.     exit
  173.   end if
  174.   setProp(1, 48, "visibility", 0)
  175.   updateStage()
  176.   delayFor(60)
  177.   repeat while the mouseDown
  178.     nothing()
  179.   end repeat
  180.   repeat while the mouseUp
  181.     nothing()
  182.   end repeat
  183.   setProp(1, 48, "visibility", 1)
  184.   updateStage()
  185.   startTimer()
  186. end
  187.  
  188. on interfaceQuit
  189.   if the timer < 30 then
  190.     exit
  191.   end if
  192.   setProp(1, 48, "visibility", 0)
  193.   puppetTransition(6, 3, 12)
  194.   updateStage()
  195.   if the movie contains "Menu" then
  196.     go("Quit")
  197.   else
  198.     go("Quit", "MainMenu.DIR")
  199.   end if
  200. end
  201.  
  202. on advanceFrame frameModifier
  203.   set gCurrentPict to gCurrentPict + frameModifier
  204.   prepImage()
  205. end
  206.  
  207. on advanceFrameOLD frameModifier
  208.   cursor(4)
  209.   set currentRelativeFrame to checkRange(the frame, gStartFrame, gEndFrame)
  210.   set newFrame to checkRangeWrap(currentRelativeFrame + frameModifier, gStartFrame, gEndFrame)
  211.   if frameModifier = 0 then
  212.     hideShow(1, 48, 0, 5)
  213.     go("buttons")
  214.     repeat with x = 3 to 15
  215.       puppetSprite(x, 1)
  216.     end repeat
  217.   end if
  218.   hideShow(1, 1, 0, 5)
  219.   puppetTransition(0)
  220.   puppetPalette("System")
  221.   go("Hide")
  222.   puppetPalette(0)
  223.   go(newFrame)
  224.   hideShow(1, 9, 1, 5)
  225.   if frameModifier <> 0 then
  226.     preLoad(checkRangeWrap(newFrame - 1, gStartFrame, gEndFrame))
  227.   end if
  228.   preLoad(checkRangeWrap(newFrame + 1, gStartFrame, gEndFrame))
  229.   set gPICThModifier to 0
  230.   set gPICTvModifier to 0
  231.   cursor(0)
  232.   setDimensions()
  233. end
  234.  
  235. on correctPalette
  236.   puppetPalette("System")
  237.   updateStage()
  238.   puppetPalette(0)
  239.   updateStage()
  240. end
  241.  
  242. on hideShow startSprite, endSprite, theVisible, whichTransition
  243.   repeat with x = startSprite to endSprite
  244.     set the visible of sprite x to theVisible
  245.   end repeat
  246.   puppetTransition(whichTransition, 1, 12)
  247.   go(the frame)
  248. end
  249.  
  250. on moveSprites startSprite, endSprite, posOrNeg
  251.   repeat with x = startSprite to endSprite
  252.     set the locV of sprite x to posOrNeg * abs(the locV of sprite x)
  253.   end repeat
  254.   updateStage()
  255. end
  256.